Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
log.debug("Setting memory maximum of domain %s (%s) to %d MiB.",
self.info['name_label'], str(self.domid), limit)
+ maxmem_cur = self.get_memory_static_max()
MiB = 1024 * 1024
self._safe_set_memory('memory_static_max', limit * MiB)
try:
return xc.domain_setmaxmem(self.domid, maxmem)
except Exception, ex:
+ self._safe_set_memory('memory_static_max', maxmem_cur)
raise XendError(str(ex))
xen.xend.XendDomain.instance().managed_config_save(self)